package com.heima.reggie.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.reggie.common.Thutil;
import com.heima.reggie.mapper.OrdersMapper;
import com.heima.reggie.pojo.Orders;
import com.heima.reggie.pojo.ShoppingCart;
import com.heima.reggie.service.OrdersService;
import com.heima.reggie.service.ShoppingCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements OrdersService {
 @Autowired
    private ShoppingCarService shoppingCarService;

    @Override
    public void submit2(Orders orders) {
        Long addressBookId = orders.getAddressBookId();
        Long User = Thutil.getThreadLocal();
        String remark = orders.getRemark();
        LambdaQueryWrapper<ShoppingCart> sp = new LambdaQueryWrapper<>();
        sp.eq(ShoppingCart::getUserId,User);
    List<ShoppingCart> list = shoppingCarService.list(sp);












    }
}
